#ifndef TESTSIGNALHP_H
#define TESTSIGNALHP_H

#include <QObject>
#include "HPSocket.h"

class testsignalhp:public QObject,public CTcpClientListener
{
    Q_OBJECT
Q_SIGNALS:
    void signal_connect_notify(CONNID dwConnID,const QString&client_info,bool conn);
    void signal_msg_notify(CONNID dwConnID,const uint8_t *pData,int len);
public:
    testsignalhp(QObject*parent = nullptr);
    ~testsignalhp();
    virtual EnHandleResult OnPrepareConnect(ITcpClient* pSender, CONNID dwConnID, SOCKET socket)override;
    virtual EnHandleResult OnConnect(ITcpClient* pSender, CONNID dwConnID)override;
    virtual EnHandleResult OnHandShake(ITcpClient* pSender, CONNID dwConnID)override;
    virtual EnHandleResult OnReceive(ITcpClient* pSender, CONNID dwConnID,const BYTE* pData, int iLength)override;
    virtual EnHandleResult OnSend(ITcpClient* pSender, CONNID dwConnID, const BYTE* pData, int iLength)override;
    virtual EnHandleResult OnClose(ITcpClient* pSender, CONNID dwConnID, EnSocketOperation enOperation, int iErrorCode)override;
};

#endif // TESTSIGNALHP_H
